<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWxAuthTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wx_auth', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->default(0)->commit("");
            $table->string('wx_openid')->nullable()->commit("省份");
            $table->string('wx_session_key')->nullable()->commit("城市");
            $table->string("type")->nullable()->commit("类型，有wx,wxapp");
            $table->string("nickname")->nullable()->commit("用户昵称");
            $table->integer('photo_id')->defalut(0)->comment('用户头像');
            $table->tinyInteger('sex')->default(0)->comment('性别，0：保密，1：男 ，2：女 ');
            $table->timestamp('birth')->nullable()->comment('出生年月日');
            $table->string('province',64)->nullable()->comment('省份');
            $table->string('city',64)->nullable()->comment('城市');
            $table->string('area',64)->nullable()->comment('地区');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
